package com.pasabahceambalaj.entity;

// Generated Oct 8, 2013 12:01:41 AM by Hibernate Tools 3.4.0.CR1

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;
import org.hibernate.validator.NotNull;

/**
 * Isemiretut generated by hbm2java
 */
@Entity
@Table(name = "isemiretut", catalog = "ambalaj", uniqueConstraints = @UniqueConstraint(columnNames = { "isemirid", "islemno" }))
public class Isemiretut implements java.io.Serializable {

	private Long id;
	private int version;
	private Urun urun;
	private Parabirim parabirim;
	private Isemir isemir;
	private String islemno;
	private String kalipeki;
	private String tur;
	private String uruniciadet;
	private Double kirik;
	private Long planfiyat;

	public Isemiretut() {
	}

	public Isemiretut(Urun urun, Isemir isemir, String islemno) {
		this.urun = urun;
		this.isemir = isemir;
		this.islemno = islemno;
	}

	public Isemiretut(Urun urun, Parabirim parabirim, Isemir isemir, String islemno, String kalipeki, String tur, String uruniciadet, Double kirik, Long planfiyat) {
		this.urun = urun;
		this.parabirim = parabirim;
		this.isemir = isemir;
		this.islemno = islemno;
		this.kalipeki = kalipeki;
		this.tur = tur;
		this.uruniciadet = uruniciadet;
		this.kirik = kirik;
		this.planfiyat = planfiyat;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "version", nullable = false)
	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "urunid", nullable = false)
	@NotNull
	public Urun getUrun() {
		return this.urun;
	}

	public void setUrun(Urun urun) {
		this.urun = urun;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "parabirimid")
	public Parabirim getParabirim() {
		return this.parabirim;
	}

	public void setParabirim(Parabirim parabirim) {
		this.parabirim = parabirim;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "isemirid", nullable = false)
	@NotNull
	public Isemir getIsemir() {
		return this.isemir;
	}

	public void setIsemir(Isemir isemir) {
		this.isemir = isemir;
	}

	@Column(name = "islemno", nullable = false)
	@NotNull
	public String getIslemno() {
		return this.islemno;
	}

	public void setIslemno(String islemno) {
		this.islemno = islemno;
	}

	@Column(name = "kalipeki")
	public String getKalipeki() {
		return this.kalipeki;
	}

	public void setKalipeki(String kalipeki) {
		this.kalipeki = kalipeki;
	}

	@Column(name = "tur")
	public String getTur() {
		return this.tur;
	}

	public void setTur(String tur) {
		this.tur = tur;
	}

	@Column(name = "uruniciadet")
	public String getUruniciadet() {
		return this.uruniciadet;
	}

	public void setUruniciadet(String uruniciadet) {
		this.uruniciadet = uruniciadet;
	}

	@Column(name = "kirik", precision = 22, scale = 0)
	public Double getKirik() {
		return this.kirik;
	}

	public void setKirik(Double kirik) {
		this.kirik = kirik;
	}

	@Column(name = "planfiyat")
	public Long getPlanfiyat() {
		return this.planfiyat;
	}

	public void setPlanfiyat(Long planfiyat) {
		this.planfiyat = planfiyat;
	}

}
